import {request} from 'umi'
import {IDefenceTags,IDefenceRows,IDefenceAddItem} from '@/utils/interface'

// 获取标签列表
export let getDefenceTags=()=>{
    return request('/sxpt/station/selectStationLabel')
}

// 获取选中的答辩列表
export let getDenfenceRows=(params:IDefenceRows)=>{
    return request('/sxpt/defence/getDefenceList',{params})
}

// 获取班级计划
export let getClassPlanTree=()=>{
    return request(`/sxpt/defence/getClasssPlanTree`)
}

// 点击保存
export let addDefence=(data:IDefenceAddItem)=>{
    return request('/sxpt/defence',{
        method:'POST',
        data
    })
}

// 获取当前答辩详情
export let getClassPlanInit=(classid:number,classPlanid:string)=>{
    return request(`/sxpt/progress/selectClassPlanInit`,{
        params:{
            classid,
            classPlanid
        }
    })
}

// 获取答辩详情
export let getTagsDetail=(defenceId:string)=>{
    return request(`/sxpt/defence/getDefenceDetial?defenceId=${defenceId}`)
}

// 删除列表
// export let deleteDefenceRow=(defenceId:string)=>{
//     return request('sxpt/defence/deleteDefence/',{
//         method:'DELETE',
//         params:{
//             defenceId
//         }
//     })
// }